package com.example.demo.Service.Impl;

import com.example.demo.Dao.RiderDao;
import com.example.demo.Entity.RiderEntity;
import com.example.demo.Service.RiderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RiderServiceImpl implements RiderService {
    @Resource
    RiderDao riderDao;

    @Override
    public List<RiderEntity> get() {
        return riderDao.get();
    }

    @Override
    public RiderEntity getByAccounts(String accounts){
        return riderDao.getByAccounts(accounts);
    }

    @Override
    public int updateByAccounts(String accounts, String username,String password,String telephone,String license,String avatar,String gender,String status) {
        return riderDao.updateByAccounts(accounts,username,password,telephone,license,avatar,gender,status);
    }

    @Override
    public int addRider(String accounts, String username,String password,String telephone,String license,String avatar,String gender) {
        return riderDao.addRider(accounts,username,password,telephone,license,avatar,gender);
    }

    @Override
    public int deleteRider(String accounts) {
        return riderDao.deleteRider(accounts);
    }
}
